<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DefaultRouter
 *
 * @author khavu
 */
class Australian_Controller_Plugin_DefaultRouter extends Zend_Controller_Plugin_Abstract {
    
    public function routeShutdown(Zend_Controller_Request_Abstract $request) {
        
        $currModule = $request->getModuleName();
        if ($currModule != 'default') {
            return;
        }
        $fontController = Zend_Controller_Front::getInstance();
        $router = $fontController->getRouter();
        $router->removeDefaultRoutes();
        $myRoutes = new Zend_Config_Ini(APPLICATION_PATH . '/configs/router/default.ini', 'production');
        $router->addConfig($myRoutes, 'routes');
        $router->route($request);
        
    }
    
}

?>
